export const pageFormItems = [
      {
        field: {
          name: 'name',
        },
        element: {
          comp: 'el-input',
          formItemProps: {
            label: '计费名称',
          },
          compProps: {
            placeholder: '左前缀匹配'
          }
        }
      },
      {
        field: {
          name: 'feeTypeDictId',
        },
        element: {
          comp: 'PtDictFrontSelect',
          formItemProps: {
            label: '计费方式',
          },
          compProps: {
            // 字典查询
            dictParam: {groupCode: 'open_platform_fee_type'}
          }
        }
      },

      {
        field: {
          name: 'deduplicateTypeDictId',
        },
        element: {
          comp: 'PtDictFrontSelect',
          formItemProps: {
            label: '去重方式',
          },
          compProps: {
            // 字典查询
            dictParam: {groupCode: 'open_platform_deduplicate_type'}
          }
        }
      },
]
export const addPageFormItems = [


  {
    field: {
      name: 'name',
    },
    element: {
      comp: 'el-input',
      formItemProps: {
        label: '计费名称',
        required: true,
        tips: '为计费规则起一个名称'
      },
      compProps: {

      }
    }
  },

      {
        field: {
          name: 'price',
          value: 1
        },
        element: {
          comp: 'el-input-number',
          formItemProps: {
            label: '单价',
            required: true,
            tips: '单位为：分'
          },
          compProps: {
            min: 0
          }
        }
      },

  {
    field: {
      name: 'feeTypeDictId',
    },
    element: {
      comp: 'PtDictFrontSelect',
      formItemProps: {
        label: '计费方式',
        required: true,
        tips: '按照某种方式进行计费',
        labelTips: '指的是对单价的计费而言<br/>如：每次100分、每月2000分'
      },
      compProps: {
        // 字典查询
        dictParam: {groupCode: 'open_platform_fee_type'}
      }
    }
  },

      {
        field: {
          name: 'feeTypeJson',
        },
        element: {
          comp: 'el-input',
          formItemProps: {
            label: '按计费方式配置',
            tips: '对计费方式进行额外配置，暂不支持',

          },
          compProps: {
            clearable: true,
            disabled: true,
            disabledReason: '暂不支持'
          }
        }
      },

  {
    field: {
      name: 'deduplicateTypeDictId',
    },
    element: {
      comp: 'PtDictFrontSelect',
      formItemProps: {
        label: '去重方式',
        required: true,
        tips: '按照某种方式在一定范围内去重，并结合去重条数配合使用',
      },
      compProps: {
        // 字典查询
        dictParam: {groupCode: 'open_platform_deduplicate_type'}
      }
    }
  },


  {
    field: {
      name: 'isDeduplicateByParameter',
      value: false
    },
    element: {
      comp: 'el-switch',
      formItemProps: {
        label: '按入参去重',
        required: true,
        tips: '默认按接口去重，否则按接口+参数去重',
        labelTips: '在请求接口时参数一样代表相同<br/>' +
            '如果一个接口支持多个参数，参数间调换顺序也代表相同（注意：body算一个参数）'
      },
      compProps: {
        activeText: '按入参去重',
        inactiveText: '按接口去重',
      }
    }
  },

      {
        field: {
          name: 'deduplicateCount',
          value: 2
        },
        element: {
          comp: 'el-input-number',
          formItemProps: {
            label: '去重条数',
            tips: '根据去重方式在一定范围内去除对应条数后计费',
            labelTips: '最小值为2，因为小于2没有意义<br/>如果去重方式选择不去重该值无效'
          },
          compProps: {
            min: 2
          }
        }
      },

      {
        field: {
          name: 'isCheckHasValue',
          value: false
        },
        element: {
          comp: 'el-switch',
          formItemProps: {
            label: '检查返回值',
            required: true,
            tips: '在接口响应中检查是否有返回数据，设置为true代表有返回数据则计费',
            labelTips: '该设置可理解为查得计费（true）和查询计费（false）'
          },
          compProps: {
            activeText: '检查返回值',
            inactiveText: '不检查返回值',
          }
        }
      },


      {
        field: {
          name: 'isCheckHandleDuration',
        },
        element: {
          comp: 'el-switch',
          formItemProps: {
            label: '检查处理时长',
            required: true,
            tips: '从开始请求到返回数据检查是否超过指定时长，设置true代表当实际处理时长小于设置的处理时长则计费'
          },
          compProps: {
            activeText: '检查处理时长',
            inactiveText: '不检查处理时长',
          }
        }
      },


      {
        field: {
          name: 'handleDuration',
          value: 60000
        },
        element: {
          comp: 'el-input-number',
          formItemProps: {
            label: '处理时长',
            tips: '单位：ms',
            labelTips: '在检查处理时长设置为true时有效,60000 = 60秒 = 1分钟'
          },
          compProps: {
            min: 100
          }
        }
      },


      {
        field: {
          name: 'remark',
        },
        element: {
          comp: 'el-input',
          formItemProps: {
            label: '描述',
            
          },
          compProps: {
            clearable: true,
          }
        }
      },












]

// 更新和添加一致
export const updatePageFormItems = addPageFormItems

